package edu.sctu.nieyu.day20150606.trainsystem;

/**
 * Created by user01 on 2015/6/6.
 */
public class Action {

    private String action= "偷窃，斗殴，猥亵";
    private Passenger passenger;

    public Action(Passenger passenger){
        this.passenger = passenger;
    }

    /**
     * 乘客行为判断，判断相关乘客的行为是否危害其他乘客
     * @return
     */
    public boolean observeTrianAct() {

        boolean is_action = false;
        if (passenger.isIs_action()) {
            if (action.contains(passenger.getAction())) {
                is_action = true;
            }
        } else {
            is_action = false;
        }
        return is_action;
    }
}
